import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Scanner;

public class IntegerPartition {

//    private static int[] f = new int[91];
//    private static void calcu(){
//        f[0] = 0;
//        f[1] = 0;
//        f[2] = 0;
//        f[3] = 1;
//        f[4] = 2;
//        for(int i = 5; i < f.length; ++i){
//            f[i] = i - 1;
//            for(int j = 1; j <= i-3; ++j)
//                f[i] += j/2;
//        }
//    }
    public static void main(String[] args) {


        ArrayList<Integer> objects = new ArrayList<>();
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int num = sc.nextInt();

            int result = 0;
            int[][] arr = new int[num + 1][];
            for (int i = 3; i <= num; i++) {
                int columnNum = (int) Math.floor((i - 1) / 2d);
                arr[i] = new int[columnNum];
                for (int j = 0; j < columnNum; j++) {
                    arr[i][j] = 1;
                    int num2 = j + 1;
                    int num1 = i - num2;
                    if (num1 > 2 * num2) {//只有这种情况才分解
                        if (num1 % 2 == 0) {//num1是偶数，计算分解情况时+1
                            arr[i][j]++;
                        }
//计算数1的分解情况
                        for (int k = j; k < arr[num1].length; k++) {
                            arr[i][j] += arr[num1][k];
                        }
                    }
                }
            }
// 输出整个二维数组的情况
// for(int i = 3; i <= num; i++){
// for(int j = 0; j < arr[i].length;j++){
// System.out.println("arr["+i+"]["+j+"] is: "+arr[i][j]);
// }
// }
            if (num == 1 || num == 2) result = 0;
            else {
                for (int i = 0; i < arr[num].length; i++) {
                    result += arr[num][i];
                }
            }
            System.out.println(result);
        }
    }
}

